package com.mlog.njyjy.ndop.common.domain;

import com.jfinal.plugin.activerecord.Model;
import com.mlog.njyjy.ndop.common.domain.core.Timeable;
import com.mlog.njyjy.ndop.common.support.Constants;
import com.mlog.njyjy.ndop.share.sql.annotation.Column;
import com.mlog.njyjy.ndop.share.sql.annotation.Id;
import com.mlog.njyjy.ndop.share.sql.annotation.Table;
import com.mlog.njyjy.ndop.share.sql.annotation.TableUnique;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author zyz
 * @version v1.0, 2020/9/10
 */
@Data
@Accessors(chain = true)
@Table(prefix = Constants.TBL_SYS_PREFIX,
        uniques = {@TableUnique(columns = "displayName")},
        comment = "通讯录")
public class ContactPerson extends Model<ContactPerson> implements Timeable {

    @Id
    private Long id;

    @Column(nullable = false, comment = "联系人")
    private String displayName;

    @Column(comment = "手机号码")
    private String phoneNum;

    @Column(comment = "电话号码")
    private String telPhoneNum;

    @Column(comment = "邮箱号码")
    private String email;

    @Column(nullable = false, comment = "类型")
    private String type;

    @Column(comment = "备注")
    private String note;

    @Column(updatable = false)
    private LocalDateTime createAt;

    private LocalDateTime updateAt;

}
